$('main .list_one').click(function(){
    console.log($(this))
    $('main .sign').css('display','none');
    $('main .sign2').css('display','block')
})


//表单验证插件
$().ready(function() {
    // 在键盘按下并释放及提交后验证提交表单
<<<<<<< HEAD
      let obj=$("#myform").validate({
=======
      $("#myform").validate({
>>>>>>> edb33377eaff027e20a1e6d92339f4fb01e8ce17
        rules: {
          username: {
            isusername: true,
            required:true,
          },
          password: {
            required: true,
            ispwd:true,
          },
<<<<<<< HEAD
          npwd: {
            required: true,
            ispwd:true,
            equalTo: "#pwd"
          },
          // email: {
          //   required: true,
          //   isemail:true,
          // },
=======
        //   npwd: {
        //     required: true,
        //     ispwd:true,
        //     equalTo: "#pwd"
        //   },
>>>>>>> edb33377eaff027e20a1e6d92339f4fb01e8ce17
          
        },
        messages: {
          username: {
            required: "请输入用户名",
            minlength: "用户名必需由两个字符组成"
          },
          password: {
            required: "请输入密码",
            minlength: "密码长度不能小于 5 个字符"
          },
<<<<<<< HEAD
         npwd: {
            required: "请输入密码",
            minlength: "密码长度不能小于 5 个字符",
            equalTo: "两次密码输入不一致"
          },
          // email:{
          //   required: ""
          // }
          
         }
        })

        $('.btn2').click(function(){
          let bool=obj.form();
          console.log(bool);
          if(bool===true){
            $('.fm').hide();
            $('.success').show();
            $(this).parent().parent().parent().find('.orange').removeClass().parent().parent().find('ul li:nth-child(3)').addClass('orange')
          }else{
            $('.fm').show()
          }
        });
        
=======
        //  npwd: {
        //     required: "请输入密码",
        //     minlength: "密码长度不能小于 5 个字符",
        //     equalTo: "两次密码输入不一致"
        //   },
        
         }
        })
>>>>>>> edb33377eaff027e20a1e6d92339f4fb01e8ce17
    });
    
    
        jQuery.validator.addMethod("isusername", function(value, element) {   
        var tel = /^[a-zA-Z0-9_-]{4,16}$/;;
        return this.optional(element) || (tel.test(value));
        }, "请正确填写您的用户名");
    
        jQuery.validator.addMethod("ispwd", function(value, element) {   
        var tel = /^[a-zA-Z0-9_-]{6,10}$/;;
        return this.optional(element) || (tel.test(value));
<<<<<<< HEAD
        }, "请正确填写您的密码");
        // jQuery.validator.addMethod("isemail", function(value, element) {   
        // var tel = /^[a-zA-Z0-9]$/;;
        // return this.optional(element) || (tel.test(value));
        // }, "请正确填写您的邮箱");
      
=======
        }, "请正确填写您的密码");
>>>>>>> edb33377eaff027e20a1e6d92339f4fb01e8ce17
